﻿<Window x:Class="Chem4Word.Core.UserSetting.UserSettingOption" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Options" Height="462" Width="424" ResizeMode="NoResize" ShowInTaskbar="False" Topmost="True" WindowStartupLocation="CenterScreen" BorderBrush="Black">
	<Grid>
		<Border Margin="6,6,6,40" Name="border1">
			<TabControl Margin="6,6,6,6" Name="tabItem">
				<TabItem Header="Import" Name="importItem">
                    <StackPanel Margin="8,8,8,8">
                        <TextBlock>
                            <Bold>On import Chemistry Add-in  cannot fix broken CML ...</Bold>
                        </TextBlock>
                        <TextBlock TextWrapping="Wrap" Margin="0,6,0,0">
                            but we can report why it does not conform to our needs and attempt to fix minor slips.
                        </TextBlock>
                        <Border Margin="6,6,6,0" BorderBrush="Black" BorderThickness="1">
                            <StackPanel Orientation="Horizontal" Margin="6,6,6,6">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="1*" />
                                        <ColumnDefinition Width="1*" />
                                    </Grid.ColumnDefinitions>
                                    <Label Width="125" Margin="0,0,6,0">On import problem:</Label>
                                    <ComboBox Grid.Column="1" Width="150"
                                              Name="ImportOption" SelectedIndex="0">
                                        <ComboBoxItem Name="importComboBoxItemAuto" MouseMove="importAutoMouseMove">Auto</ComboBoxItem>
                                        <ComboBoxItem Name="importComboBoxItemPrompt" MouseMove="importPromptMouseMove">Prompt</ComboBoxItem>
                                        <ComboBoxItem Name="importComboBoxItemFail" MouseMove="importFailMouseMove">Strict (fail)</ComboBoxItem>
                                    </ComboBox>
                                </Grid>
                            </StackPanel>
                        </Border>
                    </StackPanel>
				</TabItem>
                <TabItem Header="Gallery" Name="gallery">
                    <StackPanel Margin="8,8,8,8">
                        <TextBlock>
                            <Bold>Use Gallery of Substances</Bold>
                        </TextBlock>
                        <TextBlock TextWrapping="Wrap" Margin="0,6,0,0">
                            Chem4Word uses the template "Chem4Word2010.dotx" to store it's gallery of substances.
                            As switching document templates replaces styles etc. defined in Normal.dotx,
                            we provide a means to disable the gallery.
                            Use the checkbox below to disable the gallery.
                        </TextBlock>
                        <Border Margin="6,6,6,0" BorderBrush="Black" BorderThickness="1">
                            <StackPanel Orientation="Horizontal" Margin="6,6,6,6">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="1*" />
                                        <ColumnDefinition Width="1*" />
                                    </Grid.ColumnDefinitions>
                                    <Label Width="200">Enable Gallery</Label>
                                    <CheckBox Grid.Column="1" VerticalAlignment="Center"
                                              Name="chkUseGallery" IsChecked="True"></CheckBox>
                                </Grid>
                            </StackPanel>
                        </Border>
                        <TextBlock TextWrapping="Wrap" Margin="0,6,0,0">
                            <Bold>Note: To fully enable or disable this option Word must be closed, then re-opened.</Bold>
                        </TextBlock>
                    </StackPanel>
                </TabItem>
				<TabItem Header="Depiction" Name="depictionItem">
                    <StackPanel Margin="8,8,8,8">
                        <TextBlock TextWrapping="Wrap">
                            What is the prefered depiction
                        </TextBlock>
                        <Border Margin="6,6,6,0" BorderBrush="Black" BorderThickness="1">
                            <StackPanel Orientation="Horizontal" Margin="6,6,6,6">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="1*" />
                                        <ColumnDefinition Width="1*" />
                                    </Grid.ColumnDefinitions>
                                    <Label Margin="0,0,6,0" Width="175">In document representation</Label>
                                    <ComboBox Grid.Column="1" Name="documentPreferedDepiction" SelectedIndex="0" Width="125">
                                        <ComboBoxItem Name="documentPreferedDepiction2D" MouseMove="documentPreferedDepictionMouseMove">2D</ComboBoxItem>
                                        <ComboBoxItem Name="documentPreferedDepictionConcise" MouseMove="documentPreferedDepictionConciseMouseMove">Concise formula</ComboBoxItem>
                                        <ComboBoxItem Name="documentPreferedDepictionInline" MouseMove="documentPreferedDepictionInlineMouseMove">Inline formula</ComboBoxItem>
                                        <ComboBoxItem Name="documentPreferedDepictionName" MouseMove="documentPreferedDepictionNameMouseMove">Chemical name</ComboBoxItem>
                                        <ComboBoxItem Name="documentPreferedDepictionBold" MouseMove="documentPreferedDepictionBoldMouseMove">Bold number</ComboBoxItem>
                                    </ComboBox>
                                </Grid>
                            </StackPanel>
                        </Border>
                        <TextBlock Margin="0,6,0,0" TextWrapping="Wrap">
                            When the chemistry is imported into the document (other than from smart tag) Chemistry Add-in will attempt to use the prefered document depiciton.
                            If this does not exist then the first available depciton will be used instead.
                            <LineBreak />
                            Converting from a smart tag to a chemistry zone will always attempt to maintain the same document depiction as existed before the conversion.
                        </TextBlock>
                        <Border Margin="6,6,6,0" BorderBrush="Black" BorderThickness="1">
                            <StackPanel Orientation="Horizontal" Margin="6,6,6,6">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="1*" />
                                        <ColumnDefinition Width="1*" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition></RowDefinition>
                                        <RowDefinition></RowDefinition>
                                    </Grid.RowDefinitions>
                                    <Label Grid.Row="0" Grid.Column="0" Margin="0,0,6,0" Width="175">Navigator representation</Label>
                                    <ComboBox Grid.Row="0" Grid.Column="1" Width="125"
                                              Name="NavigatorPreferedDepiction" SelectedIndex="0">
                                        <ComboBoxItem Name="navigatorPreferedDepictionConcise" MouseMove="navigatorPreferedDepictionConciseMouseMove">Concise formula</ComboBoxItem>
                                        <ComboBoxItem Name="navigatorPreferedDepictionInline" MouseMove="navigatorPreferedDepictionInlineMouseMove">Inline formula</ComboBoxItem>
                                        <ComboBoxItem Name="navigatorPreferedDepictionName" MouseMove="navigatorPreferedDepictionNameMouseMove">Chemical name</ComboBoxItem>
                                        <ComboBoxItem Name="navigatorPreferedDepictionBold" MouseMove="navigatorPreferedDepictionBoldMouseMove">Bold number</ComboBoxItem>
                                    </ComboBox>
                                    <Label Grid.Row="1" Grid.Column="0" Margin="0,0,6,0" Width="175">
                                        Collapse navigator view
                                    </Label>
                                    <CheckBox Grid.Row="1" Grid.Column="1" VerticalAlignment="Center"
                                              Name="chkCollapseNavigator" IsChecked="True"></CheckBox>
                                </Grid>
                            </StackPanel>
                        </Border>
                    </StackPanel>
                </TabItem>
                <TabItem Header="Rendering" Name="openXmlItem">
                    <StackPanel Margin="8,8,8,8">
                        <TextBlock TextWrapping="Wrap">
                            The following options are only applicable when the Chem4Word Add-In is used with Word 2010 (or greater).
                            <LineBreak />
                            NB: Options are only applied to newly rendered structures.
                        </TextBlock>
                        <Border Margin="6,6,6,0" BorderBrush="Black" BorderThickness="1">
                            <StackPanel Orientation="Horizontal" Margin="6,6,6,6">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="1*" />
                                        <ColumnDefinition Width="1*" />
                                    </Grid.ColumnDefinitions>
                                    <Label Width="200">Render atom labels in colour</Label>
                                    <CheckBox Grid.Column="1" VerticalAlignment="Center"
                                              Name="chkRenderAtomsInColour" IsChecked="True"></CheckBox>
                                </Grid>
                            </StackPanel>
                        </Border>
                        <Border Margin="6,6,6,0" BorderBrush="Black" BorderThickness="1">
                            <StackPanel Orientation="Horizontal" Margin="6,6,6,6">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="1*" />
                                        <ColumnDefinition Width="1*" />
                                    </Grid.ColumnDefinitions>
                                    <Label Width="200">Show Implicit Hydrogen labels</Label>
                                    <CheckBox Grid.Column="1" VerticalAlignment="Center"
                                              Name="chkShowImplicitHydrogens" IsChecked="True"></CheckBox>
                                </Grid>
                            </StackPanel>
                        </Border>
                    </StackPanel>
                </TabItem>
			</TabControl>
		</Border>
		<Button Height="29" HorizontalAlignment="Right" Margin="0,0,13,5" Name="btnCancel" VerticalAlignment="Bottom" Width="75" IsCancel="True" Click="btnCancelClick">Cancel</Button>
		<Button Height="29" HorizontalAlignment="Right" Margin="0,0,94,5" Name="btnOK" VerticalAlignment="Bottom" Width="75" IsDefault="True" Click="btnOKClick">OK</Button>
	</Grid>
</Window>